//
//  EvaluationHeaderTableViewCell.swift
//  Pods
//
//  Created by eme on 2017/4/7.
//
//

import UIKit

class EvaluationHeaderTableViewCell: UITableViewCell {
    
    @IBOutlet weak var header_ImageView: UIImageView!       //商品图片
    
    @IBOutlet weak var name_Label: UILabel!                 //商品名称
    
    @IBOutlet weak var price_Label: UILabel!                //商品价格
    
    @IBOutlet weak var status_Label: UILabel!               //商品规格
    
    @IBOutlet weak var num_Label: UILabel!                  //商品数量
    
    var item:OrderDetailsArrayModel! = nil{
        didSet{
            if let model = item{
                self.header_ImageView.setUrlImage(model.img1)
                self.name_Label.text = model.pdname
                self.price_Label.text = "\(model.shprice.getPriceStr())"
                if model.pdtype == "0"{                                             //验证是否是组合商品,然后确定是否显示规格
                    self.status_Label.text = model.standard
                }else{
                    self.status_Label.text = ""
                }
                self.num_Label.text = "x\(model.detailrnumber)"
            }
        }
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        name_Label.normal_fontSize(13)
        price_Label.normal_fontSize(13)
        status_Label.normal_fontSize(13)
        num_Label.normal_fontSize(13)
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
